<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<#include "/include/head_common.html">
    <title>个人信息</title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#inputForm").validate({
                submitHandler: function (form) {
                    loading('正在提交，请稍等...');
                    form.submit();
                },
                errorContainer: "#messageBox",
                errorPlacement: function (error, element) {
                    $("#messageBox").text("输入有误，请先更正。");
                    if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
                        error.appendTo(element.parent().parent());
                    } else {
                        error.insertAfter(element);
                    }
                }
            });
        });
    </script>
</head>
<body>
<ul class="nav nav-tabs">
    <li class="active"><a href="userInfo">个人信息</a></li>
    <li><a href="modifyPwd">修改密码</a></li>
</ul>
<br/>
<form id="inputForm" action="userInfo" method="post" class="form-horizontal">
    <#include "/include/message.html">
    <input type="hidden" name="id" value="${user.id!''}"/>
    <div class="control-group">
        <label class="control-label">头像:</label>
        <div class="controls">
            <input type="text" name="photo" value="${user.photo!''}"  maxlength="150" class="required" readonly="readonly"/>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">归属公司:</label>
        <div class="controls">
            <label class="lbl">${company.name!''}</label>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">归属部门:</label>
        <div class="controls">
            <label class="lbl">${office.name!''}</label>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">姓名:</label>
        <div class="controls">
            <input type="text" name="name" value="${user.name!''}"  maxlength="50" class="required" readonly="readonly"/>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">邮箱:</label>
        <div class="controls">
            <input type="text" name="email" value="${user.email!''}" maxlength="50" class="email"/>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">电话:</label>
        <div class="controls">
            <input name="phone" type="text" value="${user.phone!''}" maxlength="50"/>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">手机:</label>
        <div class="controls">
            <input type="text" name="mobile" maxlength="50" value="${user.mobile!''}"/>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">备注:</label>
        <div class="controls">
        <textarea name="remarks">${user.remarks!''}</textarea>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">用户类型:</label>
        <div class="controls">
            <label class="lbl">
            	<#if user.userType??&&user.userType!=''>
            		<#list dicts as dict>
            			<#if user.userType==dict.value>${dict.label!''}</#if>
            		</#list>
            	</#if>
            </label>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">上次登录:</label>
        <div class="controls">
            <label class="lbl">
            	IP: ${user.loginIp!''}&nbsp;&nbsp;&nbsp;&nbsp;
            	<#if user.loginDate??>
            		时间：${user.loginDate?string("yyyy-MM-dd HH:mm:ss")}
            	<#else>
            		用户尚未登录过
            	</#if>
            </label>
        </div>
    </div>
    <div class="form-actions">
        <input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>
    </div>
</form>
</body>
</html>